package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HospitalReservationMapper;
import com.ruoyi.system.domain.HospitalReservation;
import com.ruoyi.system.service.IHospitalReservationService;

/**
 * 预约须知Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-13
 */
@Service
public class HospitalReservationServiceImpl implements IHospitalReservationService 
{
    @Autowired
    private HospitalReservationMapper hospitalReservationMapper;

    /**
     * 查询预约须知
     * 
     * @param id 预约须知主键
     * @return 预约须知
     */
    @Override
    public HospitalReservation selectHospitalReservationById(Long id)
    {
        return hospitalReservationMapper.selectHospitalReservationById(id);
    }

    /**
     * 查询预约须知列表
     * 
     * @param hospitalReservation 预约须知
     * @return 预约须知
     */
    @Override
    public List<HospitalReservation> selectHospitalReservationList(HospitalReservation hospitalReservation)
    {
        return hospitalReservationMapper.selectHospitalReservationList(hospitalReservation);
    }

    /**
     * 新增预约须知
     * 
     * @param hospitalReservation 预约须知
     * @return 结果
     */
    @Override
    public int insertHospitalReservation(HospitalReservation hospitalReservation)
    {
        hospitalReservation.setCreateTime(DateUtils.getNowDate());
        return hospitalReservationMapper.insertHospitalReservation(hospitalReservation);
    }

    /**
     * 修改预约须知
     * 
     * @param hospitalReservation 预约须知
     * @return 结果
     */
    @Override
    public int updateHospitalReservation(HospitalReservation hospitalReservation)
    {
        hospitalReservation.setUpdateTime(DateUtils.getNowDate());
        return hospitalReservationMapper.updateHospitalReservation(hospitalReservation);
    }

    /**
     * 批量删除预约须知
     * 
     * @param ids 需要删除的预约须知主键
     * @return 结果
     */
    @Override
    public int deleteHospitalReservationByIds(Long[] ids)
    {
        return hospitalReservationMapper.deleteHospitalReservationByIds(ids);
    }

    /**
     * 删除预约须知信息
     * 
     * @param id 预约须知主键
     * @return 结果
     */
    @Override
    public int deleteHospitalReservationById(Long id)
    {
        return hospitalReservationMapper.deleteHospitalReservationById(id);
    }
}
